using System;
using System.Collections.Generic;
using System.Text;
using Rapier.Kodachi.Shared;
using Microsoft.Win32;
using System.IO;
using System.Xml.Serialization;

namespace Rapier.Kodachi.SystemCommands
{
    public class SystemCommandsPlugin : Plugin
    {
        #region Constructor
        public SystemCommandsPlugin(Host host) : base(host)
        {
        }
        #endregion

        #region Overrides
        public override string Author
        {
            get { return "El Guapo"; }
        }

        public override string Url
        {
            get { return "http://www.rapiersoftware.com"; }
        }

        public override bool HasSettings
        {
            get { return false; }
        }

        public override void UpdateDatabase()
        {
            // Add Items
            Item systemItem = new Item(this, "System Command", "System Commands", "Windows System Commands");
            systemItem.GetImage = delegate { return Rapier.Kodachi.SystemCommands.Properties.Resources.System.ToBitmap(); };
            systemItem.DefaultAction = "Lock Workstation";
            systemItem.Properties["SystemCommand"] = true;
            Host.AddItem(systemItem);

            // Add Actions
            Host.AddAction(new Actions.ShutDown(this));
            Host.AddAction(new Actions.LockComputer(this));
            Host.AddAction(new Actions.LogOff(this));
            Host.AddAction(new Actions.Restart(this));
            Host.AddAction(new Actions.Suspend(this));
        }
        #endregion
    }
}
